/**
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*!
 * \file conv2d_util.h
 * \brief
 */

#ifndef CONV2D_UTIL_H
#define CONV2D_UTIL_H

#include "kernel_utils.h"
#include "kernel_tiling/kernel_tiling.h"
using namespace AscendC;

const static uint32_t BLOCK_L0_N = 16;
const static uint32_t BLOCK_L0_M = 16;
const static uint64_t C0_SIZE = 32;
const static uint64_t FRACTAL_SIZE = 512;
const static uint64_t BT_SIZE = 64;
const static uint64_t SIZE_OF_FP16 = 2;
const static uint64_t PAD_IDX_T = 2;
const static uint64_t PAD_IDX_B = 3;
const static uint64_t PAD_IDX_L = 0;
const static uint64_t PAD_IDX_R = 1;
const static uint64_t MAX_PAD_R = 255;
const static uint64_t FMAP_BATCH_DIM = 0;
const static uint64_t FMAP_CIN_DIM = 1;
const static uint64_t FMAP_H_DIM = 2;
const static uint64_t FMAP_W_DIM = 3;
const static uint64_t KERNEL_COUT_DIM = 0;
const static uint64_t KERNEL_H_DIM = 2;
const static uint64_t KERNEL_W_DIM = 3;
const static uint64_t OUTPUT_H_DIM = 2;
const static uint64_t OUTPUT_W_DIM = 3;
const static uint32_t BLOCK_SIZE = 512;
const static uint64_t F8_NUM_IN_F16 = 2;

enum class IterateOrder {
    ORDER_MTERFIRST = 0,
    ORDER_NTERFIRST,
    UNDEF,
};

#endif // __CONV2D_UTIL_H__
